- Description:
This key defines which file CloudCannon should use to populate a file created with an option in the + Add button dropdown.
The value is a string that specifies a file path relative to the root of your repository. This file is used to populate the initial contents of a new file if the Collection defined in
add_options.collectionhas no Schemas configured.The
add_options.schemakey will overridedefault_content_fileif configured.- Appears in:
└── collections_config └── * └── add_options └── [*] └── Add Option └── default_content_file- Type:
string- Examples:
In this example, we want CloudCannon to populate the initial contents of new files with
event_template.yml.Copied to clipboardcollections_config: events: add_options: name: Add new event collection: upcoming_events default_content_file: event_template.yml{ "collections_config": { "events": { "add_options": { "name": "Add new event", "collection": "upcoming_events", "default_content_file": "event_template.yml" } } } }